#ifndef __STEP_H
#define __STEP_H

#define STEP_DIR         GPIO_Pin_1
#define STEP_DIR_GPIO    GPIOB
#define STEP_POSITIVE    STEP_DIR_GPIO->BRR = STEP_DIR
#define STEP_NEGATIVE    STEP_DIR_GPIO->BSRR = STEP_DIR

#define STEP_RUN_IO      GPIO_Pin_0
#define STEP_RUN_GPIO    GPIOB

#define STEP_RUN_END         GPIO_Pin_11
#define STEP_RUN_END_GPIO    GPIOA
#define READ_STEP_RUN_END    STEP_RUN_END_GPIO->IDR&STEP_RUN_END      

void Step_Init();
void Set_Step_Motor_Para(unsigned short Step);
void Ctrl_Step_Motor_MCU(unsigned char Code);
void Run_Step_Motor(unsigned char dir);
unsigned char Wait_Step_Motor();

#endif
